/*
${' '}* Copyright ${.now?string('yyyy')} The JA-SIG Collaborative. All rights reserved.
${' '}* distributed with this file and available online at
${' '}*/
package ${basePackage}.domain.${module};<#lt>

import com.lap.framework.common.ddd.AggregateRoot;
import lombok.Getter;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * ${(tableComment)!''}领域。
 *
 * @author ${author!'generator'}
 * @version ${version!'1.0.0'}
 */
@Getter
public class ${className} extends AggregateRoot {
<#if fields??>
  <#assign validFields = fields?filter(field -> !field.ignoreEntity)>

  <#list validFields as field>
  private final ${field.javaType} ${field.fieldName};
  </#list>

  public ${className}(
  <#list validFields as field>
      ${field.javaType} ${field.fieldName}<#if field_has_next>,</#if>
  </#list>
  ) {
  <#list validFields as field>
    this.${field.fieldName} = ${field.fieldName};
  </#list>
  }
</#if>

  public boolean isNew() {
    return id == null;
  }
}
